<p>Trigger the build on Gerrit events.</p>
<p>
    <u>The triggered build will be provided with the following parameters:</u>
</p>
<ul>
    <li>
        <strong>For all events</strong>
        <ul>
            <li><strong>GERRIT_PROJECT</strong>: The name of the project.</li>
            <li><strong>GERRIT_EVENT_TYPE</strong>: The type of this event.</li>
            <li><strong>GERRIT_EVENT_HASH</strong>: A unique hash making all triggered builds unique in the queue.</li>
            <li><strong>GERRIT_EVENT_ACCOUNT</strong>: The name and email of the account associated with the event, if any.
                <i>&quot;Name&quot; &lt;name@somewhere.com&gt;</i>.</li>
            <li><strong>GERRIT_EVENT_ACCOUNT_NAME</strong>: The name of the account associated with the event, if any.</li>
            <li><strong>GERRIT_EVENT_ACCOUNT_EMAIL</strong>: The email of the account associated with the event, if any.</li>
            <li><strong>GERRIT_EVENT_ACCOUNT_USERNAME</strong>: The username of the account associated with the event, if any.</li>
            <li><strong>GERRIT_NAME</strong>: The name of the Gerrit instance that provided the event.</li>
            <li><strong>GERRIT_HOST</strong>: The hostname of the Gerrit instance that provided the event.</li>
            <li><strong>GERRIT_PORT</strong>: The port number of the Gerrit instance that provided the event.</li>
            <li><strong>GERRIT_SCHEME</strong>: The protocol name of the Gerrit instance that provided the event.</li>
            <li><strong>GERRIT_VERSION</strong>: The version number of the Gerrit instance that provided the event.</li>
        </ul>
    </li>
    <li>
        <strong>For events on a change</strong>
        <i>(Patch set created, Draft published, Change merged, Change abandoned, Change restored, Comment added)</i>
        <ul>
            <li><strong>GERRIT_CHANGE_ID</strong>: The Change-Id.</li>
            <li><strong>GERRIT_CHANGE_SUBJECT</strong>: The first line of the commit message.</li>
            <li><strong>GERRIT_CHANGE_COMMIT_MESSAGE</strong>: The full commit message, UTF-8 Base64 encoded.
            (Only when Gerrit version is 2.8 or above).</li>
            <li><strong>GERRIT_CHANGE_NUMBER</strong>: The change number.</li>
            <li><strong>GERRIT_CHANGE_URL</strong>: The URL to the change.</li>
            <li><strong>GERRIT_PATCHSET_NUMBER</strong>: The Patch Set number.</li>
            <li><strong>GERRIT_PATCHSET_REVISION</strong>: The Patch Set revision id.</li>
            <li><strong>GERRIT_BRANCH</strong>: The name of the branch.</li>
            <li><strong>GERRIT_TOPIC</strong>: The name of the topic.</li>
            <li><strong>GERRIT_REFSPEC</strong>: The ref-spec. (refs/changes/xx/xxxx/z).</li>
            <li><strong>GERRIT_CHANGE_OWNER</strong>: The name and email of the owner of the change
                <i>&quot;Name&quot; &lt;name@somewhere.com&gt;</i>.
            </li>
            <li><strong>GERRIT_CHANGE_OWNER_NAME</strong>: The name of the owner of the change.</li>
            <li><strong>GERRIT_CHANGE_OWNER_EMAIL</strong>: The email of the owner of the change.</li>
            <li><strong>GERRIT_CHANGE_OWNER_USERNAME</strong>: The username of the owner of the change.</li>
            <li><strong>GERRIT_PATCHSET_UPLOADER</strong>: The name and email of the uploader of the Patch Set
                <i>&quot;Name&quot; &lt;name@somewhere.com&gt;</i>.
            </li>
            <li><strong>GERRIT_PATCHSET_UPLOADER_NAME</strong>: The name of the uploader of the Patch Set.</li>
            <li><strong>GERRIT_PATCHSET_UPLOADER_EMAIL</strong>: The email of the uploader of the Patch Set.</li>
            <li><strong>GERRIT_PATCHSET_UPLOADER_USERNAME</strong>: The username of the uploader of the Patch Set.</li>
            <li><strong>GERRIT_PATCHSET_ABANDONER</strong>: The name and email of the abandoner of the Patch Set
                <i>&quot;Name&quot; &lt;name@somewhere.com&gt;</i>.
            </li>
            <li><strong>GERRIT_PATCHSET_ABANDONER_NAME</strong>: The name of the abandoner of the Patch Set.</li>
            <li><strong>GERRIT_PATCHSET_ABANDONER_EMAIL</strong>: The email of the abandoner of the Patch Set.</li>
            <li><strong>GERRIT_PATCHSET_ABANDONER_USERNAME</strong>: The username of the abandoner of the Patch Set.</li>
            <li><strong>GERRIT_PATCHSET_RESTORER</strong>: The name and email of the restorer of the Patch Set
                <i>&quot;Name&quot; &lt;name@somewhere.com&gt;</i>.
            </li>
            <li><strong>GERRIT_PATCHSET_RESTORER_NAME</strong>: The name of the restorer of the Patch Set.</li>
            <li><strong>GERRIT_PATCHSET_RESTORER_EMAIL</strong>: The email of the restorer of the Patch Set.</li>
            <li><strong>GERRIT_PATCHSET_RESTORER_USERNAME</strong>: The username of the restorer of the Patch Set.</li>
        </ul>
    </li>
    <li>
        <strong>Additionally for Change merged events</strong>
        <ul>
            <li><strong>GERRIT_NEWREV</strong>: The revision of the merge commit.</li>
        </ul>
    </li>
    <li>
        <strong>Additionally for Comment added events</strong>
        <ul>
            <li><strong>GERRIT_EVENT_COMMENT_TEXT</strong>: The comment posted to Gerrit, UTF-8 Base64 encoded.</li>
        </ul>
    </li>
    <li>
        <strong>For Reference updated events</strong>
        <ul>
            <li><strong>GERRIT_REFNAME</strong>: Ref name within project.</li>
            <li><strong>GERRIT_OLDREV</strong>: The old value of the ref, prior to the update.</li>
            <li><strong>GERRIT_NEWREV</strong>: The new value the ref was updated to.</li>
        </ul>
    </li>
</ul>
<p>
    <i>
        The parameters will be available to the build as environment variables.
        E.g. <strong>$GERRIT_REFSPEC</strong>
    </i>
</p>
